package GUI;

import java.awt.CardLayout;
import java.io.IOException;

import javax.swing.JFrame;
import javax.swing.JPanel;
/**
 * This class create  MainScreen GUI
 *  * @author Shlomit Yosfan
 * @author Nofar Sutliman
 */
public class MainScreen extends JFrame {
	
public static JFrame frm;
public static CardLayout cardLayot;
public static JPanel card = new JPanel();
	
	/**
	 * Constructor of main screen 
	 */
	public MainScreen()
	{
		
	}
/**
 * Get the corrent card
 * @return the correct jpanel 
 */
	public static JPanel getCard() {
		return card;
	}
/**
 * Set the correct card 
 * @param card- Panel 
 */
	public static void setCard(JPanel card) {
		MainScreen.card = card;
		
	}
	/**
	 * Creates the main screen window 
	 * @throws IOException
	 */
public static void BuildScreen() throws IOException {

	frm= new JFrame();
	JPanel contentPane = (JPanel)frm.getContentPane();
	card.setLayout(cardLayot = new CardLayout());

	Login loginframe= new Login();

	card.add("Login", loginframe);
	cardLayot.show(card, "Login");
	
	contentPane.add(card);
	frm.setSize(900,700);  
	frm.setVisible(true);
	frm.setResizable(false);
	frm.setLocation(0, 0);
	frm.setDefaultCloseOperation(EXIT_ON_CLOSE);
	
}

}
